/**
 * url.queryURLParams() -> { lx:1, name: 'js', hash: 'video' }
 * url.queryURLParams('name') -> 'js'
 */
function queryURLParams(url, attr) {
  let obj = {};
  url.replace(/#([^?&=#]+)/g, (_, $1) => obj['HASH'] = $1);
  url.replace(/([^?&=#])=([^?&=#])/g, (_, $1, $2) => obj[$1] = $2);
  return typeof attr !=='undefined' ? obj[attr] : obj;
}